package com.bridgeintelligent.tag.webserver.dim.mgmt.service.department;

import com.bridgeintelligent.tag.webserver.dim.mgmt.api.DimRep;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created by JackCheung on 2019/9/13 9:28 PM.
 */
@Api(tags = "部门查看")
@RestController
@RequestMapping("api/dimDepartment")
public class DepartmentController {

    private IDepartmentService iDepartmentService;

    public DepartmentController(IDepartmentService iDepartmentService) {
        this.iDepartmentService = iDepartmentService;
    }

    @ApiOperation(value = "查看部门", notes = "部门查看")
    @GetMapping("/list")
    public DimRep list() {
        return iDepartmentService.list();
    }

    @ApiOperation(value = "查看有标签的部门", notes = "部门查看")
    @GetMapping("/listInDims")
    public DimRep listInDims() {
        return iDepartmentService.listInDims();
    }
}
